package com.doubao.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * token消费记录实体类
 */
@Data
@TableName("token_consumption_record")
public class TokenConsumptionRecord implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 消费日期
     */
    private LocalDate consumptionDate;

    /**
     * 会话ID
     */
    private Long sessionId;

    /**
     * 消息ID
     */
    private Long messageId;

    /**
     * 输入tokens
     */
    private Integer promptTokens;

    /**
     * 输出tokens
     */
    private Integer completionTokens;

    /**
     * 总消费tokens
     */
    private Integer totalTokens;

    /**
     * 消费后余额
     */
    private Integer balanceAfter;

    /**
     * AI提供商ID
     */
    private Long aiProviderId;

    /**
     * AI模型ID
     */
    private String aiModelId;

    /**
     * 创建时间
     */
    private LocalDateTime createdAt;
}